package cn.iocoder.yudao.module.wms.controller.admin.bom.vo;

import cn.iocoder.yudao.module.system.dal.dataobject.user.AdminUserDO;
import cn.iocoder.yudao.module.wms.dal.dataobject.inventory.InventoryDO;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import com.fhs.core.trans.anno.Trans;
import com.fhs.core.trans.constant.TransType;
import com.fhs.core.trans.vo.VO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

@Schema(description = "管理后台 - BOM主 Response VO")
@Data
@ExcelIgnoreUnannotated
public class BomRespVO implements VO {

    @Schema(description = "id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14002")
    private Long id;

    @Schema(description = "存货id")
    @Trans(type = TransType.SIMPLE, target = InventoryDO.class, fields = {"code","name","specModel"}, refs = {"code","name","specModel"})
    private Long inventoryId;

    @Schema(description = "存货编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("存货编码")
    private String code;

    @Schema(description = "存货名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("存货名称")
    private String name;

    @Schema(description = "规格型号")
    @ExcelProperty("规格型号")
    private String specModel;

    @Schema(description = "版本号")
    @ExcelProperty("版本号")
    private String version;

    @Schema(description = "版本说明")
    @ExcelProperty("版本说明")
    private String note;

    @Schema(description = "备注", example = "你说的对")
    @ExcelProperty("备注")
    private String remark;

    @Schema(description = "创建人")
    @Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "creatorName")
    private String creator;

    @Schema(description = "创建人名称")
    @ExcelProperty("创建人")
    private String creatorName;

    @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("创建时间")
    private LocalDateTime createTime;

    @Schema(description = "修改人")
    @Trans(type = TransType.SIMPLE, target = AdminUserDO.class, fields = "nickname", ref = "updaterName")
    private String updater;

    @Schema(description = "修改人名称")
    @ExcelProperty("修改人")
    private String updaterName;

    @Schema(description = "修改时间", requiredMode = Schema.RequiredMode.REQUIRED)
    @ExcelProperty("修改时间")
    private LocalDateTime updateTime;

}